package com.cloud.weixin.project.mapper;

import com.cloud.weixin.project.model.entity.WxUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 微信用户 Mapper 接口
 * </p>
 *
 * @author Sam
 * @since 2021-04-26
 */
public interface WxUserMapper extends BaseMapper<WxUser> {

    @Update("update mp_wx_user set status = status - #{num} where id = #{id} ")
    void reduceAmount(@Param("id") String id, @Param("num") int num);
}
